<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="../templates/templateAdminPrincipal.xhtml"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

	<ui:define name="windowTitle">
        SAMUPG - Nueva noticia
    </ui:define>

	<ui:define name="contenido">
		<h:form prependId="false">
			<p:tabView id="tvNuevaNoticia">
				<p:tab title="Nueva Noticia">
					<p:messages id="msgs"/>
					<h:panelGrid columns="2" style="font-size:12px;">
						<p:commandButton value="Crear"
							actionListener="#{nuevaNoticiaController.crearNoticiaAction}" 
							update="msgs, txtTitulo, txtContenido, txtImagen"/>
						<h:panelGroup />

						<h:outputText value="Titulo: " />
						<p:inputText id="txtTitulo" value="#{nuevaNoticiaController.noticiaNueva.titulo}" size="60"
							required="true"/>

						<h:outputText value="Contenido: " />
						<p:inputTextarea id="txtContenido"
							value="#{nuevaNoticiaController.noticiaNueva.contenido}"
							rows="10" cols="70" required="true"/>

						<h:outputText value="Imagen: " />
						<p:inputText id="txtImagen"
							value="#{nuevaNoticiaController.noticiaNueva.rutaImagen}" required="true"/>
					</h:panelGrid>
				</p:tab>
			</p:tabView>
		</h:form>
	</ui:define>

</ui:composition>